package org.springblade.product.service;

import com.google.auto.service.AutoService;
import org.springblade.common.constant.CommonConstant;
import org.springblade.core.launch.constant.NacosConstant;
import org.springblade.core.launch.service.LauncherService;
import org.springframework.boot.builder.SpringApplicationBuilder;

import java.util.Properties;

@AutoService(LauncherService.class)
public class ProductLauncherServiceImpl implements LauncherService {

	@Override
	public void launcher(SpringApplicationBuilder builder, String appName, String profile) {
		Properties props = System.getProperties();
		props.setProperty("spring.cloud.nacos.config.ext-config[0].data-id", "blade-product.yaml");
		props.setProperty("spring.cloud.nacos.config.ext-config[0].group", "test");
		props.setProperty("spring.cloud.nacos.config.ext-config[0].refresh", "true");
	}

	@Override
	public int getOrder() {
		return 10;
	}

}
